import request from '@/utils/request'
export function fetchDepartmentList() {
  return request({
    url: '/company/department'
  })
}
// 下拉列表
export const getEmployeeSimple = () => request({ url: '/sys/user/simple' })
// 添加
// export const addDepartments = data => request({ url: '/company/department', data })
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 编辑
export function getDepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
// 删除
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 更新
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
